package com.jumi.microservice.material.service.impl;

import java.util.List;

import com.jumi.microservice.material.domain.JmMaterial;
import com.jumi.microservice.material.dto.JmMaterialResponse;
import com.jumi.microservice.material.mapper.JmMaterialMapper;
import com.jumi.microservice.material.service.JmMaterialService;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @ClassName JmMaterialServiceImpl
 * @Description
 * @Author Abel Yang
 * @Date 2020/8/24/024 15:50
 **/
@Service
public class JmMaterialServiceImpl implements JmMaterialService
{
	@Resource
	private JmMaterialMapper jmMaterialMapper;

	@Override
	public JmMaterialResponse findById(Long materialId)
	{
		return jmMaterialMapper.findById(materialId);
	}

	@Override
	public List<JmMaterialResponse> findByGoodsId(Long goodsId)
	{
		return jmMaterialMapper.findByGoodsId(goodsId);
	}

	@Override
	public List<JmMaterialResponse> findByGoodsCode(String code)
	{
		return jmMaterialMapper.findByGoodsCode(code);
	}

	@Override
	public Integer findMaterialIdByMaterialCode(String materialCode)
	{
		return jmMaterialMapper.findMaterialIdByMaterialCode(materialCode);
	}

	@Override
	public String fingSpecNameByMaterialCode(String materialCode)
	{
		return jmMaterialMapper.fingSpecNameByMaterialCode(materialCode);
	}

	@Override
	public String findBarCodeByMaterialCode(String materialSkuCode)
	{
		return jmMaterialMapper.findBarCodeByMaterialCode(materialSkuCode);
	}
}
